package common

import (
	"fmt"
	"math/rand"
	"time"
)

func Rand(min, max int) (num int) {
	r := rand.New(rand.NewSource(time.Now().UnixNano()))
	num = r.Intn(max-min) + min
	return num
}

//生成logID
func CreateLogId() (logId string) {
	num := Rand(10000, 99999)
	logId = fmt.Sprintf("%d%d", time.Now().UnixNano(), num)
	return logId
}
